package com.hkfrich.common.constant;

/**
 * @ClassName Constants
 * @Desscription
 * @Author _HeiShuai
 * @Date 2022/8/18 9:14
 * @Version 1.0
 **/
public class Constants {


    //CODE 码
    public static final int SUCCESS_CODE = 200;
    public static final int ERROR_CODE = 500;
    public static final int TIMEOUT_CODE = 999;
    //验证码前缀
    public static final String CAPTCHA_CODE_KEY = "validateCode_";
    //JWT有效期   s
    public static final Long JWT_TTL = 60 * 60 *1000L;
    //JWT秘钥明文
    public static final String JWT_KEY = "Heishuai";
    //redis存用户信息前缀
    public static final String USERINFO = "USERINFO_";
    //用户状态0 正常
    public static final String STATUS_ENABLE = "0";
    //用户状态1 禁止
    public static final String STATUS_DISABLE = "1";
    //token header
    public static final String TOKEN = "token";
    //http请求
    public static final String HTTP = "http://";
    //https请求
    public static final String HTTPS = "https://";
    //UTF-8 字符集
    public static final String UTF8 = "UTF-8";
    //GBK 字符集
    public static final String GBK = "GBK";
    //数据库 时间字段
    public static final String CREATE_TIME = "create_time";
    //baseentity beginTime
    public static final String BEGINTIME = "beginTime";
    //baseentity endTime
    public static final String ENDTIME = "endTime";
    /**分页 页码*/
    public static final String PAGENUM = "pageNum";
    /**分页 每页数量*/
    public static final String PAGESIZE = "pageSize";
    //gen文件名
    public static final String GENFILENAME_ZIP = "HKRich.zip";

    /** 单表（增删改查） */
    public static final String TPL_CRUD = "crud";

    /** 树表（增删改查） */
    public static final String TPL_TREE = "tree";

    /** 主子表（增删改查） */
    public static final String TPL_SUB = "sub";

    /** 树编码字段 */
    public static final String TREE_CODE = "treeCode";

    /** 树父编码字段 */
    public static final String TREE_PARENT_CODE = "treeParentCode";

    /** 树名称字段 */
    public static final String TREE_NAME = "treeName";

    /** 上级菜单ID字段 */
    public static final String PARENT_MENU_ID = "parentMenuId";

    /** 上级菜单名称字段 */
    public static final String PARENT_MENU_NAME = "parentMenuName";

    /** 数据库字符串类型 */
    public static final String[] COLUMNTYPE_STR = { "char", "varchar", "nvarchar", "varchar2" };

    /** 数据库文本类型 */
    public static final String[] COLUMNTYPE_TEXT = { "tinytext", "text", "mediumtext", "longtext" };

    /** 数据库时间类型 */
    public static final String[] COLUMNTYPE_TIME = { "datetime", "time", "date", "timestamp" };

    /** 数据库数字类型 */
    public static final String[] COLUMNTYPE_NUMBER = { "tinyint", "smallint", "mediumint", "int", "number", "integer",
            "bit", "bigint", "float", "double", "decimal" };

    /** 页面不需要编辑字段 */
    public static final String[] COLUMNNAME_NOT_EDIT = { "id", "create_by", "create_time", "del_flag" };

    /** 页面不需要显示的列表字段 */
    public static final String[] COLUMNNAME_NOT_LIST = { "id", "create_by", "create_time", "del_flag", "update_by",
            "update_time" };

    /** 页面不需要查询字段 */
    public static final String[] COLUMNNAME_NOT_QUERY = { "id", "create_by", "create_time", "del_flag", "update_by",
            "update_time", "remark" };

    /** Entity基类字段 */
    public static final String[] BASE_ENTITY = { "pageNum", "pageSize", "beginTime", "endTime" };

    /** Tree基类字段 */
    public static final String[] TREE_ENTITY = { "parentName", "parentId", "orderNum", "ancestors", "children" };

    /** 文本框 */
    public static final String HTML_INPUT = "input";

    /** 文本域 */
    public static final String HTML_TEXTAREA = "textarea";

    /** 下拉框 */
    public static final String HTML_SELECT = "select";

    /** 单选框 */
    public static final String HTML_RADIO = "radio";

    /** 复选框 */
    public static final String HTML_CHECKBOX = "checkbox";

    /** 日期控件 */
    public static final String HTML_DATETIME = "datetime";

    /** 图片上传控件 */
    public static final String HTML_IMAGE_UPLOAD = "imageUpload";

    /** 文件上传控件 */
    public static final String HTML_FILE_UPLOAD = "fileUpload";

    /** 富文本控件 */
    public static final String HTML_EDITOR = "editor";

    /** 字符串类型 */
    public static final String TYPE_STRING = "String";

    /** 整型 */
    public static final String TYPE_INTEGER = "Integer";

    /** 长整型 */
    public static final String TYPE_LONG = "Long";

    /** 浮点型 */
    public static final String TYPE_DOUBLE = "Double";

    /** 高精度计算类型 */
    public static final String TYPE_BIGDECIMAL = "BigDecimal";

    /** 时间类型 */
    public static final String TYPE_DATE = "Date";

    /** 模糊查询 */
    public static final String QUERY_LIKE = "LIKE";

    /** 相等查询 */
    public static final String QUERY_EQ = "EQ";

    /** 需要 */
    public static final String REQUIRE = "1";


    /**velocity模板的地址*/
    public static final String DOMAIN_JAVA_VM = "vm/java/domain.java.vm";
    public static final String MAPPER_JAVA_VM = "vm/java/mapper.java.vm";
    public static final String SERVICE_JAVA_VM = "vm/java/service.java.vm";
    public static final String SERVICEIMPL_JAVA_VM = "vm/java/serviceImpl.java.vm";
    public static final String CONTROLLER_JAVA_VM = "vm/java/controller.java.vm";
    public static final String MAPPER_XML_VM = "vm/xml/mapper.xml.vm";
    public static final String SQL_VM = "vm/sql/sql.vm";
    public static final String API_JS_VM = "vm/js/api.js.vm";
    public static final String INDEX_VUE_VM = "vm/vue/index.vue.vm";
    public static final String INDEX_TREE_VUE_VM = "vm/vue/index-tree.vue.vm";
    public static final String SUB_DOMAIN_JAVA_VM = "vm/java/sub-domain.java.vm";
    /** 项目空间路径 */
    public static final String PROJECT_PATH = "main/java";
    /** mybatis空间路径 */
    public static final String MYBATIS_PATH = "main/resources/mapper";
    /** 默认上级菜单，系统工具 */
    public static final String DEFAULT_PARENT_MENU_ID = "3";

    /**
     * 字典管理 cache key
     */
    public static final String SYS_DICT_KEY = "sys_dict:";

    /** 校验返回结果码 */
    public final static String UNIQUE = "0";
    public final static String NOT_UNIQUE = "1";


    public static final String ADMIN_ROLE = "admin";


    public static final String DEL_FLAG_COLUMN = "del_flag";
    public static final Integer DEL_FLAG_VALUE = 1;
    public static final String ROLE_SORT_COLUM = "role_sort";
}
